package main

import (
	"fmt"
)

func show( ch <-chan int) {		//<-chann作为参数，只能从管道里取数据

	for value := range ch{
		fmt.Println(value)
	}
}


func main(){
	ch := make(chan int, 5)
	ch <- 1
	ch <- 2
	ch <- 3
	ch <- 4
	ch <- 5
	show(ch)
	close(ch)
}